<template>
    <div class="cycle-item-container">
            <div class="func-nav">

            </div>
            <div class="list-container">
                <div class="list-item">

                </div>
            </div>
    </div>
</template>

<script setup>
import { ref, defineProps, onMounted, reactive } from "vue"
const Data=ref([])
const props = defineProps({
    title: {
        type: String,
        default:"标题"
    },
    fields: {
        type: Array,
        defauly: () => { 
            return ["name","age"]
        }
    },
    loadMore: {
        type: Function,
        default: (Meta) => { 
            console.log("执行加载函数")
        }
    },
    Onlykey: {
        type: String,
        default: 'id'
        // 数据去重默认字段
    },
    funcNav: {
        type: Array,
        default:()=> {
            return [{
                type: 'Selection',
                options: [''],
                default:1
            },
            {
                type: 'button',
                onClick: () => { },
                value:'更新'
            }
            ]
        }
    },
    meta: {
        type: Array,
        default: () => { 
            return [
                {
                    label: 'id',
                    value:1
                }
            ]
        }
    }
})
const Meta = reactive({})
// 初始化函数处理元信息
const initializeFormData = () => {
    props.meta.forEach((item) => {
    Meta[item.label]=item.value
  });
};


onMounted(async () => { 
    initializeFormData()
})
</script>

<style scoped>
.cycle-item-container{
    width: 100%;
    height: 100%;
}

</style>